/* 
 * Shuriken is the legal property of its developers. Please refer to the
 * COPYRIGHT file distributed with this
 * source distribution.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

using System;
using System.Collections.Generic;
using System.Text;
using Shuriken.Core.Store; 

namespace Shuriken.Core.Ranking
{
    public interface IRankProvider
    {
        /// <summary>
        /// Calculates rank score for a given expression and candidate
        /// </summary>
        /// <param name="expression">search expression</param>
        /// <param name="candidate">candidate for this search</param>
        /// <param name="hitMask">hitmask for this search</param>
        /// <returns>score from 0 to 99, the higher the value is the better</returns>
        double CalculateRank(ISearchable candidate, string expression, MutableIndexSet hitMask);

        /// <summary>
        /// Calculates rank score for a given expression and candidate
        /// </summary>
        /// <param name="expression">search expression</param>
        /// <param name="candidate">candidate for this search</param>
        /// <returns>score from 0 to 99, the higher the value is the better</returns>
        // double CalculateRank(string candidate, string expression);

        /// <summary>
        /// Calculates rank score for a given expression and candidate
        /// </summary>
        /// <param name="expression">search expression</param>
        /// <param name="candidate">candidate for this search</param>
        /// <param name="hitMask">hitmask for this search</param>
        /// <returns>score from 0 to 99, the higher the value is the better</returns>
        // double CalculateRank(string candidate, string expression, MutableIndexSet hitMask);

        /// <summary>
        /// Provides feedback to the rank provider about the selection. 
        /// </summary>
        /// <param name="candidate">candidate for the feedback</param>
        void RegisterHit(ISearchable candidate);
    }

}
